﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace TCS.Web.Admin.NewsClassManage
{
    public partial class ShowNew : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["tid"] != ""&&Request.QueryString["tid"]!="")
            {
                ShowInfo(int.Parse(Request.QueryString["tid"]));
            }
        }

        private void ShowInfo(int Id)
        {
            TCS.BLL.NewsManage.NewsClass bll = new TCS.BLL.NewsManage.NewsClass();
            TCS.Model.NewsManage.NewsClass model = bll.GetModel(Id);


            TCS.Model.Gsp_Administrative Class = new TCS.BLL.Gsp_Administrative().GetModel(int.Parse(model.ClassId.ToString()));
            this.labqy.Text = Class.AddName; ;//区县

            if (model.CATAPARENTID == model.ClassId)
            {
                this.dropParent.Text = model.ClassDesc;
            }
            else
            {
                TCS.Model.NewsManage.NewsClass ns = new TCS.BLL.NewsManage.NewsClass().GetModel(int.Parse(model.CATAPARENTID.ToString()));
                this.dropParent.Text = ns.ClassDesc;
            }

            this.txtClassDesc.Text = model.ClassDesc;//名称
            //this.txtClassPicture .Text= model.ClassPicture;//顺序
            model.createtime = DateTime.Now;
            model.CATAPARENTID = 0;
            this.txt_pc.Text = model.CATASENDRATE;//频率
            this.txt_lx.Text = model.FEETYPE;//类型
            this.txt_stime.Text = model.BEGINDATE;//开始时间
            this.txt_endtime.Text = model.ENDDATE;//结束时间
            this.txt_bm.Text = model.BOSS;//编码
            this.txt_bh.Text = model.CATACODE;//编号
            this.txt_count.Text = model.MEMO;//概要说明
            this.txt_je.Text = model.FEEVALUE;


        }
    }
}
